next up previous
Next: 3.2.6 Double Buffering Up: 3.2 Functions Previous: 3.2.4 Rendering Contexts

3.2.5 Synchronization Primitives

To prevent X requests from executing until any outstanding OpenGL rendering is done, call

void glXWaitGL ( void ) ;

OpenGL calls made prior to glXWaitGL are guaranteed to be executed before X rendering calls made after glXWaitGL. While the same result can be achieved using glFinish, glXWaitGL does not require a round trip to the server, and is therefore more efficient in cases where the client and server are on separate machines.

glXWaitGL is ignored if there is no current rendering context. If the drawable associated with the calling thread's current context is a window that is no longer valid, a GLXBadCurrentWindow error is generated.

To prevent the OpenGL command sequence from executing until any outstanding X requests are completed, call

void glXWaitX ( void ) ;

X rendering calls made prior to glXWaitX are guaranteed to be executed before OpenGL rendering calls made after glxWaitX. While the same result can be achieved using XSync, glXWaitX does not require a round trip to the server, and is therefore more efficient in cases where the client and server are on separate machines.

glXWaitX is ignored if there is no current rendering context. If the drawable associated with the calling thread's current context is a window that is no longer valid, a GLXBadCurrentWindow error is generated.



Mark Segal
Wed Jan 11 18:38:15 PST 1995